<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>标题</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/lib/layui/css/layui.css">
    <link rel="stylesheet" href="/static/css/weadmin.css">
    <link rel="stylesheet" href="/static/css/buildUnit/common.css">
    <link rel="stylesheet" href="/statics/layui/font/font.css" media="all"/>
    <style type="text/css">
        html, body {
            height: 100%;
            overflow-y: auto;
        }

        .hide {
            display: none;
        }
    </style>
</head>
<body>
<div>
    <form id="form" class="layui-form layui-form-pane" action="" lay-filter="example">
        <div class="layui-collapse">
            <div class="layui-colla-item">
                <h2 class="layui-colla-title">人员基本信息</h2>
                <div class="layui-colla-content layui-show">
                    <table class="layui-table v-table">
                        <tbody>
                        <tr class="hide">
                            <td width="24%"></td>
                            <td width="13%"></td>
                            <td width="13%"></td>
                            <td width="24%"></td>
                            <td width="13%"></td>
                            <td width="13%"></td>
                        </tr>
                        <tr>
                            <td class="th8">人员姓名</td>
                            <td colspan="2">
                                <input name="realName" type="text" class="layui-input layui-disabled formData" disabled>
                            </td>
                            <td class="th8">性别</td>
                            <td colspan="2">
                                <input name="genderName" type="text" class="layui-input layui-disabled formData"
                                       disabled>
                            </td>
                        </tr>
                        <tr>
                            <td class="th8">身份证号</td>
                            <td colspan="2">
                                <input name="userCard" type="text" class="layui-input layui-disabled formData" disabled>
                            </td>
                            <td class="th8">民族</td>
                            <td colspan="2">
                                <input name="nationName" type="text" class="layui-input layui-disabled formData"
                                       disabled>
                            </td>
                        </tr>
                        <tr>
                            <td class="th8">出生日期</td>
                            <td colspan="2">
                                <input name="birthDate" type="text" class="layui-input layui-disabled formData"
                                       disabled>
                            </td>
                            <td class="th8">手机号码</td>
                            <td colspan="2">
                                <input name="contact" type="text" class="layui-input layui-disabled formData" disabled>
                            </td>
                        </tr>
                        <tr>
                            <td class="th8">电子邮箱</td>
                            <td colspan="2">
                                <input name="email" type="text" class="layui-input layui-disabled formData" disabled>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <!--<div class="layui-collapse">
            <div class="layui-colla-item">
                <h2 class="layui-colla-title">资质证书</h2>
                <div class="layui-colla-content layui-show">
                    <table class="layui-hide" id="dataList" lay-filter="dataList"></table>
                </div>
            </div>
        </div>-->
    </form>
</div>
<script type="text/javascript" src="/lib/layui/layui.js"></script>
<script src="/static/js/main.js"></script>
<!--<script type="text/javascript" src="../../../statics/js/sys/editDict.js"  charset="utf-8"></script>-->
<script>
    layui.use(['form', 'sessionFun', 'configure', 'configureCom', 'element', 'matchDict'], function () {
        window.$ = layui.$;
        var form = layui.form;
        var configure = layui.configure;
        var configureCom = layui.configureCom;
        var matchDict = layui.matchDict;
        var sessionFun = layui.sessionFun;
        var listData = sessionFun.get(configure.SESSION_ZIZHI_USER_LIST_DATA);
        configureCom.postDataAjax(configure.ZIZHI_USER_INFO_HTTP, {userId: listData.userId}).then(function (res) {
            var data = res.user;
            data.genderName = matchDict.name(res.user.gender, configure.SEX);
            data.nationName = matchDict.name(res.user.nation, configure.NATION_CODE);
            form.val('example', data)
        });
        configureCom.postDataAjax(configure.ZIZHI_USER_CERT_LIST_HTTP, {
            userId: listData.userId,
            aptitudeStatus: 2
        }).then(function (res) {
            var cols = [[
                {
                    field: 'registerType', title: '证书类别', templet: function (d) {
                        return '<p>' + matchDict.name(d.registerType, configure.CERT_TYPE_CODE) + '</p>'
                    }
                },
                {field: 'aptitudeNumber', title: '证书编号'},
                {field: 'grantTime', title: '发证日期'},
                {field: 'aptitudeOrg', title: '发证机关'},
                {
                    field: 'aptitudeStatus', title: '状态', templet: function (d) {
                        return '<p>' + matchDict.name(d.aptitudeStatus, configure.USER_APTITUDE_STATUS) + '</p>';
                    }
                }
            ]];
            configureCom.tableRenderUserDefined({}, cols, res.list, 'dataList', '', true);
        });
        form.render();
    });
</script>
</body>
</html>
